namespaced users/session controllers cause rspec stories to fail.
-
Paul Cortens
Here is a reposting of the code snippet:
================================== ra_navigation_steps.rb ================================== When %r{$actor creates an? $resource with $attributes} do |actor, resource, attributes| attributes = attributes.to_hash_from_story - if resource =~ /singular (\w+)/ + if resource =~ /singular ([\w\/]+)/ resource = $1.downcase.singularize post "/#{resource}", attributes else post "/#{resource.downcase.pluralize}", { resource.downcase.singularize => attributes } end end -
mrflip
- Tag set to generated, install, model, nested
Thanks for the patch, fix applied.
Just curious -- can you present the use case for a nested controller? As in, what problem does it solve?
Would a super-simple three-roles role system (non-activated user, user, admin) meet the same needs, if that came as a separate plugin guaranteed to work simply with restful authentication?
I've been arguing for some changes that will make this much harder but other things easier.
-
Paul Cortens
- Assigned user cleared.
- Tag changed from generated, install, model, nested to generated, install, model, nested, rspec, stories
The application I was working on when I found this is a small CMS. It will be used as the basis for several project we have. We thought it would be a little cleaner to have all the CMS/admin code in a namespace. Having nested routes kept in line with it so that when we reference our URLs with admin_my_model_path it is always clear in code that the url is for admin stuff.
Overall it isn't a super high value use case. If you have changes that add more value then I don't think anyone loses much by not making the change I suggested.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.